package com.lebang.entity.sys;

import com.lebang.model.enums.ResourceCategory;

import java.util.Date;
import java.util.List;
import java.util.Objects;

public class Resource {

	private Date createTime;

	private String resource;
	
	private String parent;
	
	private String title;
	
	private String icon;
	
	private String path;
	
	private ResourceCategory category;
	
	private String params;
	
	private Integer sort;
	
	private List<Resource> items;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getResource() {
		return resource;
	}

	public void setResource(String resource) {
		this.resource = resource;
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public ResourceCategory getCategory() {
		return category;
	}

	public void setCategory(ResourceCategory category) {
		this.category = category;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public List<Resource> getItems() {
		return items;
	}

	public void setItems(List<Resource> items) {
		this.items = items;
	}


	@Override
	public boolean equals(Object o) {
		String obj = o.toString();
		return path.equals(obj);
	}

	@Override
	public int hashCode() {
		return Objects.hash(path);
	}
}
